package com.example.myapplication.a_mvp.presenter;

import com.example.mvp.mvp.presenter.BasePresenter;
import com.example.myapplication.a_mvp.contract.MyContract;
import com.example.myapplication.b_entity.Daxia;

import javax.inject.Inject;

import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;

public class DaxiaPresenter extends BasePresenter<MyContract.MyModel,MyContract.MyView> {
    @Inject
    public DaxiaPresenter(MyContract.MyModel mymodel, MyContract.MyView myview) {
        super(mymodel, myview);
    }
    public void getMeizi(int index1,int index2){
        mymodel.daxia(index1, index2, new Observer<Daxia>() {
            @Override
            public void onSubscribe(Disposable d) {

            }

            @Override
            public void onNext(Daxia meizi) {
                myview.show_daxia(meizi.getData());
            }

            @Override
            public void onError(Throwable e) {

            }

            @Override
            public void onComplete() {

            }
        });
    }

}
